<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Test02</title>
</head>
<body>
<script type="text/javascript">
    // let {foo: foo, bar: bar} = {foo: "aaa", bar: "bbb"};
    // let {foo, bar} = {foo: "aaa", bar: "bbb"};
    // let {foo: foo1, bar: bar1} = {foo: "aaa", bar: "bbb"};

    // let foo1;
    // ({foo: foo1} = {foo: "aaa", bar: "bbb"});
    //
    // console.log(foo1);
    // console.log(bar1);
    // console.log(c);

    // let {loc: {start: {line: line}}} = {}

    // let {log: log1, sin, cos} = Math;
    //
    // console.log(log1(10));

    let arr = [10, 20, 30];

    let {0: first, [arr.length - 1]: last} = arr;

    console.log(first);
    console.log(last);
</script>
</body>
</html>